
<head>
    <meta charset="UTF-8">
    <title>报价图片编辑</title>
    <script src='/static/assets/js/jquery.js'></script>
    <!-- bootstrap & fontawesome -->
    <link rel="stylesheet" href="/static/assets/css/bootstrap.css" />
    <link rel="stylesheet" href="/static/assets/css/font-awesome.css" />
    <style>
        .title{
            line-height: 100px;
            height: 100px;
            text-align: left;
        }
        .img{
            border:2px solid grey;
        }
        .main{
            padding-bottom: 20px;
            padding-top: 20px;
            border-bottom:1px solid grey;
        }
    </style>
</head>
<body>
<div class="face">
    <form id="form_face" action="/printer/api/imgupload"  method="post" enctype="multipart/form-data" style="width:auto;">
        <input type="file" name="fileToUpload" id="fileToUpload" onchange="fileSelected();" style="display:none;">
        <!--<input type="hidden" id="location" name="location">-->
        <input type="submit"  id="submit"  style="display:none;">
    </form>
</div>
<script type="text/javascript">
    function fileSelect(v) {
        $('#fileToUpload').attr("name",v)
        document.getElementById("fileToUpload").click();
    }

    function fileSelected() {
        // 文件选择后触发次函数
        document.getElementById("submit").click();

    }

    $(function () {
        $(".img").each(function () {
            var src = $(this).attr("src");
            var jstime =  (new Date()).getTime();
            src = src + "?jstime="+jstime;
            $(this).attr("src",src);
        })
    })
</script>

<div class="row main">
    <div class="title col-lg-1 col-lg-offset-1">
            <span style="font-size: 24px">
                首页
            </span>
    </div>
    <div class=" col-lg-10">
        <img class="img " src="/upload/index.png" width="100px" height="100px" name="index"  onclick="fileSelect('index')">
    </div>
</div>

<div class="row main">
    <div class="title col-lg-1 col-lg-offset-1">
            <span style="font-size: 24px">
                手提袋
            </span>
    </div>
    <div class=" col-lg-10">
        <img class="img " src="/upload/std.png" width="100px" height="100px" name="std"  onclick="fileSelect('std')">
    </div>
</div>


<div class="row main">
    <div class="title col-lg-1 col-lg-offset-1">
            <span style="font-size: 24px">
                信封
            </span>
    </div>
    <div class=" col-lg-10">
        <img class="img " src="/upload/xf.png" width="100px" height="100px" name="xf"  onclick="fileSelect('xf')">
    </div>
</div>


<div class="row main">
    <div class="title col-lg-1 col-lg-offset-1">
            <span style="font-size: 24px">
                无碳联单
            </span>
    </div>
    <div class=" col-lg-10">
        <img class="img " src="/upload/wtld.png" width="100px" height="100px" name="wtld"  onclick="fileSelect('wtld')">
    </div>
</div>


<div class="row main">
    <div class="title col-lg-1 col-lg-offset-1">
            <span style="font-size: 24px">
                PVC卡
            </span>
    </div>
    <div class=" col-lg-10">
        <img class="img " src="/upload/pvc.png" width="100px" height="100px" name="pvc"  onclick="fileSelect('pvc')">
    </div>
</div>

</body>
